package com.zh.elec.dao.impl;

import java.util.List;

import com.zh.elec.dao.ProductPriceRecordDao;
import com.zh.elec.dao.base.BaseDao;
import com.zh.elec.model.ProductPriceRecord;

/**
 * 商品价格记录表
 * @author scy
 *
 */
public class ProductPriceRecordDaoImpl extends BaseDao implements ProductPriceRecordDao {

	@Override
	public Object save(ProductPriceRecord obj) {
		return this.saveOrUpdate(obj);
	}

	@Override
	public Object update(ProductPriceRecord obj) {
		return this.saveOrUpdate(obj);
	}

	@Override
	public Object getObjById(ProductPriceRecord obj) {
		return this.getObjById(obj);
	}

	@Override
	public Object del(ProductPriceRecord obj) {
		return this.del(obj);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<ProductPriceRecord> findByHql(String hql) {
		return this.find(hql);
	}

	@Override
	public List<ProductPriceRecord> findByName(String name, Object value) {
		return this.findByName(name, value);
	}

	@Override
	public List<ProductPriceRecord> findAll() {
		return this.findByHql(" from ProductPriceRecord");
	}

}
